<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/css/style.css">
<title>Insert title here</title>
<%  
    response.setHeader("Cache-Control","no-store");  
    response.setDateHeader("Expires", 0);  
    response.setHeader("Pragma","no-cache");   
%>
</head>
<body>
	<div class="home-container" id="top">

		<div class="top-nav">
			<div class="mid-nav">
				<a href="${pageContext.request.contextPath}/index" class="header-title"> <span>Shopping</span>
				</a>
			</div>
		</div>

		<div class="mid-nav">

			<table class="table table-striped" style="text-align: center; width:850px;">
				<thead>
					<tr>
						<th>Img</th>
						<th>DishName</th>
						<th>Number</th>
						<th>Price</th>
						<th>Timestamp</th>
					</tr>
				</thead>
				<tbody id="orderBody">
					<c:forEach var="order" items="${orderList }">
						<tr id="${order.oid}">
							<td><img src="/image/${order.dish.img}" class="dish-img"></td>
							<td>${order.dish.name}</td>
							<td>${order.count}</td>
							<td>${order.dish.price * order.count}</td>
							<td>${order.otime}</td>
							<c:set value="${sum + order.dish.price * order.count}" var="sum" />
						</tr>
					</c:forEach>
				</tbody>

				<tfoot>
					<tr>
						<td>Total:</td>
						<td colspan="3"></td>
						<td id="total">${sum }</td>
					</tr>
				</tfoot>
			</table>
		</div>
	</div>
</body>
</html>